package com.springboot.mapper;

import com.springboot.model.DoctorAppointSet;
import com.springboot.model.DoctorAppointSetKey;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;
import java.util.Date;

@Mapper
public interface DoctorAppointSetMapper {
    int deleteByPrimaryKey(Integer doctorId, String bookDate);

    int insert(DoctorAppointSet record);

    int insertSelective(DoctorAppointSet record);

    DoctorAppointSet selectByPrimaryKey(DoctorAppointSetKey key);

    int updateByPrimaryKeySelective(DoctorAppointSet record);

    int updateByPrimaryKey(DoctorAppointSet record);

    //通过医生id查找医生预约时间列表
    ArrayList<DoctorAppointSet> selectByDoctorId(Integer doctorId);
    //查找所有医生的预约
    ArrayList<DoctorAppointSet> selectAllDoctorOrder();

    //通过医生id查找医生姓名
    String selectDoctorNameById(Integer doctorId);

    //通过预约日期查找所有设置预约的医生
    ArrayList<DoctorAppointSet> selectByBookDate(String bookDate);

    //通过医生姓名查找医生id
    Integer selectDoctorIdByName(String doctorName);

    //在预约表中查询是否有这条记录
    DoctorAppointSet searchAppoint(Integer doctorId, Date bookDate);


}